package ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.authorizeRFCPanel.authorizeRFCPanelSubs.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import ch.bfh.abhmcm.SoftwareEngineeringAndDesign.controller.authoriseRFC.LoadreadyforApprovalRFCThread;
import ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.authorizeRFCPanel.AuthorizeRFCPanel;

public class LoadButtonListener implements ActionListener {

	private AuthorizeRFCPanel authorizeRFCPanel;
	private LoadreadyforApprovalRFCThread loadopenRFCThread;

	public LoadButtonListener(AuthorizeRFCPanel authorizeRFCPanel) {
		this.authorizeRFCPanel = authorizeRFCPanel;
	}

	@Override
	public void actionPerformed(ActionEvent e) {

		this.loadopenRFCThread = new LoadreadyforApprovalRFCThread(authorizeRFCPanel);

		this.authorizeRFCPanel.getFunctionPanel().getProgrss().setVisible(true);
		this.authorizeRFCPanel.getFunctionPanel().getBu_showFRC()
				.setVisible(true);

		this.loadopenRFCThread.start();
	}

}
